window.onload =function(){
	// 1.Object对象  
	var person = new Object();
	person.name ='My Name';
	person.age=18;
	person.getName=function(){
		return this.name;
	}
	//2.对象字面量方式
	var person = {
		name:'My name',
		age:18,
		getName:function(){
			return this.name;
		}
	}
	delete person.age;
	
	var Obj =function(msg){
		this.msg=msg;
		this.show=function(){
			alert(this.msg)
		};
		this.wait=function(){
			setTimeout(this.show,2000)
		};
	}
	var aa = new Obj('ac');
	aa.wait();
}
